$OpenBSD: patch-setup_py,v 1.2 2014/09/16 13:15:52 edd Exp $

Fix calls to gmake.

--- setup.py.orig	Fri Jan 31 19:40:05 2014
+++ setup.py	Wed Apr 30 14:10:28 2014
@@ -41,6 +41,13 @@ try:
 except ImportError:
     pass
 
+def get_make_cmd():
+    if sys.platform.startswith('freebsd') or \
+            sys.platform.startswith('openbsd'):
+        return 'gmake'
+    else:
+        return 'make'
+
 # import required features
 from hgviewlib.__pkginfo__ import modname, version, license, description, \
      web, author, author_email
@@ -163,13 +170,9 @@ class build_doc(_build):
     def run(self):
         # be sure to compile man page
         self.mkpath(self.build_dir)
-        if sys.platform.startswith('freebsd'):
-            make_cmd = 'gmake'
-        else:
-            make_cmd = 'make'
+        make_cmd = get_make_cmd()
         try:
-            check_call([make_cmd, '-C', self.build_dir,
-                        '-f', '../../doc/Makefile', 'VPATH=../../doc'])
+            check_call([make_cmd, "-C", "doc"])
         except:
             if not py2exe:
                 # does not make sense (either because of windows vs toolchain
@@ -275,12 +278,8 @@ class install_doc(_install_data):
         self.set_undefined_options('install', ('install_base', 'install_dir'))
 
     def run(self):
-        check_call(['make', '-C', self.build_dir, '-f',
-                    '../../doc/Makefile',
-                    'VPATH=../../doc',
-                    'install',
-                    'PREFIX=%s' % self.install_dir])
-
+        make_cmd = get_make_cmd()
+        check_call([make_cmd, "-C", "doc", "install", "PREFIX=%s" % self.install_dir])
 
 class install(_install):
     user_options = [
